package org.uned.agonzalo16.bitacora.domain;

import com.googlecode.objectify.Ref;
import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Index;
import com.googlecode.objectify.annotation.Load;
import com.googlecode.objectify.annotation.Parent;

@Entity
@Cache
public class Comment extends BaseEntity {

	private String content;

	@Parent
	private Ref<Article> article;

	@Load
	@Index
	private Ref<User> user;

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Article getArticle() {
		return article.get();
	}

	public void setArticle(Article article) {
		this.article = Ref.create(article);
	}

	public User getUser() {
		return user.get();
	}

	public void setUser(User value) {
		user = Ref.create(value);
	}

}
